/***************************************************************************
 *   Copyright (C) 2006 by Matej Svejda                                    *
 *   mata@aw-modell.at                                                     *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/
 
#ifndef DESTICKUI_H
#define DESTICKUI_H

#include "widgets/bpmslider.h"
#include "widgets/beatselect.h"
#include "widgets/accentselect.h"
#include "widgets/togglebutton.h"
#include "widgets/volumeslider.h"
#include "widgets/bpmtooltip.h"
#include "metronome.h"

#include <kmainwindow.h>
#include <qpushbutton.h>
#include <qwidget.h>
#include <kconfig.h>
#include <qlayout.h>
#include <kglobal.h>
#include <kiconloader.h>
#include <qpopupmenu.h>
#include <klocale.h>
#include <qlabel.h>
#include <qstring.h>

class DestickUI : public QWidget
{
	Q_OBJECT
	public:
		DestickUI(KConfig *aConfig, QWidget *parent = 0, const char *name = 0);
		~DestickUI();
		
	private:
		KConfig *config;
		Metronome *metronome;
		BPMSlider *bpmSlider;
		VolumeSlider *volumeSlider;
		AccentSelect *accentSelect;
		BeatSelect *beatSelect;
		BPMToolTip *bpmToolTip;
		
		QGridLayout *layout;
		QPopupMenu *configContextMenu;
		
		int visualizationVisibilityIndex;
		bool visualizationVisible;
		
	private slots:
		void removeBPMToolTip();
		void toggleVisualizationVisibility();
		void updateVisualizationVisibility(bool visible);
};

#endif
